Field of the Invention
The present invention relates to an image processing apparatus, a method for controlling the same, and a storage medium.
Description of the Related Art
There are image processing apparatuses such as image forming apparatuses and image reading apparatuses that have, in addition to a normal power state, a power saving state for reducing standby power. For such image processing apparatuses, a technique for reducing, at the time of shifting from the normal power state to the power saving state, the link rate (communication rate) of communication via a network from a first link rate, that is used in the normal power state, to a second link rate, that is slower than the first link rate is known. This can achieve a reduction in power consumption. When a packet is received, an image processing apparatus in the power saving state generally returns from the power saving state to the normal power state and responds to the received packet.
Japanese Patent Laid-Open No. 2010-206241 describes a method in which an electronic device (image processing apparatus) in a power saving state decides, when a packet is received, a communication rate to be used after returning to a normal power state on the basis of a protocol and a port number included in the received packet. In this method, the communication rate is changed from a second (slow) communication rate to a first (fast) communication rate only if needed, such as when a large amount of data is transmitted or received, resulting in a reduction in the number that the communication rate is changed. That is, by deciding the communication rate (link rate) based on a protocol and a port number included in the received packet, it is possible to change the communication rate only if transmission or reception of a large amount of data occurs, for example, in the case of a print request. This can reduce the frequency of link disconnection that occurs when the communication rate is changed, and suppress occurrence of network errors and the like of the device.
However, in Japanese Patent Laid-Open No. 2010-206241, the image processing apparatus decides the communication rate (link rate) only on the basis of a protocol and a port number included in the received packet. Accordingly, there may be the case where the image processing apparatus cannot decide an appropriate link rate when the image processing apparatus provides a plurality of network services that have the same protocol and port number but different amounts of data communication.
For example, assume that the image processing apparatus provides hypertext transfer protocol (HTTP) access and internet printing protocol (IPP) printing as network services. HTTP and IPP are both transmission control protocols (TCPs) and both use the port number 80. The HTTP access used in the image processing apparatus is mainly used for accessing a remote user interface (UI). Therefore, such HTTP access performs communication of small amounts of data, and thus the first (fast) link rate is not required, and the second link rate that is slower than the first link rate is sufficient. Meanwhile, in the IPP printing, data communication of large amounts of print data occurs, and thus the first (fast) link rate may be required.
Also, with the simple network management protocol (SNMP), different from the above examples of HTTP access and IPP printing, there are cases where communication of a large amount of data occurs and cases where communication of a small amount of data occurs, for each information request. Therefore, when an SNMP packet is received, the image processing apparatus needs to determine, on the basis of the received packet, whether or not communication of a large amount of data will occur so as to decide which of the first (fast) link rate and the second (slow) link rate to use.